﻿using System;
using System.IO;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            bool zuo = Directory.Exists("c:\\Users");
            if (zuo)
            {
                Directory.Delete("c:\\Users", true);
            }
            else
            {
                Directory.CreateDirectory("D:\\Users");
            }
            FileInfo fileInfo = new FileInfo("D:\\Users\\Admin\\Desktop\\text.txt");
            fileInfo.Create().Close();
            string you = @"C:\\Users\\Admin\\Desktop\\text.txt";

            StreamWriter streamWriter = new StreamWriter(you);
            streamWriter.WriteLine("远赴人间惊鸿宴，一睹人间盛世颜");
            streamWriter.Flush();
            Console.WriteLine("操作成功");
            






        }
    }
}
